<?php
 namespace App\Http\Controllers; use TechOnline\Laravel\Dao\ModelUtil; class IndexController extends BaseController { public function index() { $superPage = ModelUtil::get('super_page', ['url' => '/']); $superPageItems = []; if ($superPage) { $superPageItems = ModelUtil::all('super_page_item', ['pageId' => $superPage['id']], ['*'],['sort', 'asc']); ModelUtil::decodeRecordsJson($superPageItems, 'content'); } $viewData = []; $viewData['superPageItems'] = $superPageItems; return $this->_view('index', $viewData); } } 